<%@ page pageEncoding="UTF-8" %>
<%
    String contextPath = pageContext.getServletContext().getContextPath();
    String requestURL = request.getRequestURL().toString();
    String requestURI = request.getRequestURI();
    if (!requestURI.equals("/")) {
        requestURL = requestURL.replace(requestURI, "");
    }

    if (requestURL.endsWith("/")) {
        requestURL = requestURL.substring(0, requestURL.length() - 1);
    }

    if (contextPath.equals("/")) {
        contextPath = "";
    }
    //	requestURL = requestURL.replaceFirst("http://","https://");
    request.setAttribute("ctx", requestURL + contextPath);
    request.setAttribute("ctxLayui", requestURL + contextPath+"/static");
%>

<script type="text/javascript">
    var ctx = "${ctx}";
    var ctxLayui = "${ctxLayui}";
</script>


